-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add tracing support using Micrometer #1695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm liking the approach.
Does this meet the spec for transactions and retryable operations?
I'm hoping so as both OperationContext#withSessionContext
and OperationContext#withTimeoutContext
reuse the operation id.
However, it would be worth clarifying before reviewing further.
import com.mongodb.internal.tracing.TraceContext; | ||
|
||
public class MicrometerTracer implements Tracer { | ||
private final io.micrometer.tracing.Tracer tracer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe these can be imported and you don't need to use full path names. Even though this dependency is optional, it will be there at compile time (and in testing) so would only be an issue if a user tried to import the class without taking the dependency.
- Modifying UnifiedTest runner to support collecting Micrometer spans
https://jira.mongodb.org/browse/JAVA-5733